import * as BABYLON from '@babylonjs/core';
import * as GUI from '@babylonjs/gui';
import '@babylonjs/loaders';
import { BabylonCanvas } from './modules/BabylonCanvas';

// 等待DOM加载完成
document.addEventListener('DOMContentLoaded', async () => {
    console.log("canvas loaded");
    // 获取画布元素
    const canvas = document.getElementById('renderCanvas') as HTMLCanvasElement;
    const babylonCanvas = await BabylonCanvas.create(canvas);
    babylonCanvas.startRender();
});